Technical Q&A
TB58 - Styled custom dialog items under Navigation Services
(11-January-99)
Q: How do we customize the font characteristics of
custom items in a NavPutFile dialog? We are
adding custom dialog elements using the
NavCustomControl call and passing the
kNavCtlAddControlList constant and a
'DITL ' handle. Unfortunately, we do not seem to
be able to set the font size or number for the custom items.
We have tried both 'ictb ' and
'dftb ' resources, but Navigation Services
seems to ignore all these. What is the simplest way to
customize the font characteristics of custom items in a
NavPutFile dialog? We would
prefer if this could be done in a 'dftb ' or
'ictb ' resource, but do not want to end up
parsing this information by ourselves.
A: Indeed, Nav Services does not honor
'ictb ' or 'dftb ' resources. This
is because it only knows about dialog item list handles, and
a dialog item list handle does not contain the resource ID
of an 'ictb ' or 'dftb '
resource.
If you want styled items in your Nav customization
area, you will need to get the control handles of the items
which interest you, create and initialize a
ControlFontStyleRec , and pass the control
handle and the ControlFontStyleRec to
SetControlData along with an appropriate tag
constant such as kControlFontStyleTag .
It is not necessary to parse the
'ictb ' or 'dftb ' information
yourself, because you can use a hard-coded
ControlFontStyleRec without causing
localization problems, but it so happens that
ControlFontStyleRec closely resembles the
format of the items in a 'dftb ' resource, so
you may want to go that route.
-- Pete Gontier
Worldwide Developer Technical Support
Technical Q&As | Contents
Previous Question | Next Question
To contact us, please use the Contact
Us page.
|